DEFINE OBJECTS 4
DEFINE OBJECT SANNY BUILDER v. 2.99e  
DEFINE OBJECT DYN_LADDER               // Object number -1
DEFINE OBJECT DYN_LADDER_2             // Object number -2
DEFINE OBJECT BEACHTOWEL01             // Object number -3

DEFINE MISSIONS 0

DEFINE EXTERNAL_SCRIPTS 1 // Use -1 in order not to compile AAA script
DEFINE SCRIPT LADDER AT @LADDER        // 0

DEFINE UNKNOWN_EMPTY_SEGMENT 0

DEFINE UNKNOWN_THREADS_MEMORY 0

{$VERSION 3.1.0000}

//-------------MAIN---------------
thread 'MAIN' 
fade 1000 0 
01F0: set_player_max_wanted_level_to 0 
set_wb_check_to 0 
00C0: set_current_time_hours_to 23 current_time_minutes_to 0 
04E4: unknown refresh_game_renderer_at -450.149 2269.016 
Camera.SetAtPos(-450.149, 2269.016, 47.358)
#NULL = Player.Create(-450.149, 2269.016, 47.358, $PLAYER_CHAR)
$PLAYER_CHAR = Actor.EmulateFromPlayer($PLAYER_ACTOR)
07AF: get_player $PLAYER_CHAR group_to $PLAYER_GROUP 
Camera.SetBehindPlayer
set_weather 16 
Player.SetClothes($PLAYER_CHAR, "VEST", "VEST", Torso)
Player.SetClothes($PLAYER_CHAR, "JEANSDENIM", "JEANS", Legs)
Player.SetClothes($PLAYER_CHAR, "SNEAKERBINCBLK", "SNEAKER", Shoes)
Player.SetClothes($PLAYER_CHAR, "PLAYER_FACE", "HEAD", Head)
Player.Build($PLAYER_CHAR)
Actor.Angle($PLAYER_ACTOR) = 180.0
select_interior 0 
0629: change_stat 181 to 4 // integer values 
01EB: set_traffic_density_multiplier_to 0.0 
099E: set_police_patrols_traffic_enabled 0 
06D0: set_ambulances_and_firetrucks_enabled 0 
016C: restart_if_wasted_at_3D_coord -450.149 2269.016 47.358 Z_angle 180.0 for_town_number 0 
0180: set_on_mission_flag_to $ONMISSION 
0914: init_external_script 0 (LADDER) 
0929: init_external_script_with_object_trigger 0 (LADDER) object #DYN_LADDER priority 100 radius 6.0 type -1 
0929: init_external_script_with_object_trigger 0 (LADDER) object #DYN_LADDER_2 priority 100 radius 6.0 type -1 
03E6: remove_text_box 
wait 1000 
fade 1000 1 
end_thread 

//-------------External script 0 (LADDER)---------------

:LADDER
thread 'LADDER' 
18@ = 0.0 // L = FLOAT 
19@ = 0.0 // L = FLOAT 
20@ = 0.0 // L = FLOAT 
21@ = 0.0 // L = FLOAT 
22@ = 0.0 // L = FLOAT 
23@ = 0.0 // L = FLOAT 
29@ = 0 // L = INT 
if 
  29@ == 1 // L == INT 
jf @LADDER_118 
#BEACHTOWEL01 = Object.Init(0.0, 0.0, 0.0, 0@)

:LADDER_118
wait 0 
if 
03CA:   is 0@ valid_object_handle 
jf @LADDER_1153 
if 
0977:   player_in_radius_of_object 0@ external_script_trigger 
jf @LADDER_1153 
if 
   Player.Defined($PLAYER_CHAR)
jf @LADDER_1153 
if 
   not Actor.Dead($PLAYER_ACTOR)
jf @LADDER_1153 
if 
8A0C:   not is_player $PLAYER_CHAR on_jetpack 
jf @LADDER_1153 
0400: get_object 0@ position_3D_coord_with_offset 0.0 0.0 0.0 store_to 5@ 6@ 7@ 
0@ = Object.Angle(3@)
if 
00FF:   is_actor $PLAYER_ACTOR near_3D_coord 5@ 6@ 7@ within_3D_radius 1.2 1.2 1.0 show_sphere 0 and_onfoot 
jf @LADDER_386 
0512: display_permanent_text_box 'GYM1_81'  // Press ~k~~VEHICLE_ENTER_EXIT~ to use this machine.

:LADDER_292
wait 0 
if 
00FF:   is_actor $PLAYER_ACTOR near_3D_coord 5@ 6@ 7@ within_3D_radius 1.2 1.2 1.0 show_sphere 0 and_onfoot 
jf @LADDER_386 
if and
80E1:   not is_button_pressed_pad 0 button 0 
80E1:   not is_button_pressed_pad 0 button 1 
00E1:   is_button_pressed_pad 0 button 16 
jf @LADDER_292 
Actor.Angle($PLAYER_ACTOR) = 3@
Camera.SetBehindPlayer
Camera.Restore_WithJumpCut
jump @LADDER_395 

:LADDER_386
03E6: remove_text_box 
jump @LADDER_118 

:LADDER_395
if 
00FF:   is_actor $PLAYER_ACTOR near_3D_coord 5@ 6@ 7@ within_3D_radius 1.2 1.2 1.0 show_sphere 0 and_onfoot 
jf @LADDER_292 
03E6: remove_text_box 
wait 50 
if 
   Object.Model(0@) == #DYN_LADDER
jf @LADDER_802 
Player.CanMove($PLAYER_CHAR) = False
04C4: get_actor $PLAYER_ACTOR position_3D_coord_with_offset 0.6 -2.8 0.0 store_to 8@ 9@ 10@ 
04C4: get_actor $PLAYER_ACTOR position_3D_coord_with_offset 0.6 -2.4 3.0 store_to 11@ 12@ 13@ 
068E: get_camera_target_point_3D_coord_to 14@ 15@ 16@ 
17@ = 4.04 // L = FLOAT 
0063: 16@ -= 10@ // L -= L (float) 
0073: 16@ /= 17@ // L /= L (float) 
0097: make 16@ absolute_float // local 
005B: 10@ += 16@ // L += L (float) 
Camera.OnPed($PLAYER_ACTOR, 15, 2)
0936: set_camera_position_3D_coord_to 8@ 9@ 10@ transverse_to 11@ 12@ 13@ timelimit 3000 drop_mode 1 
0400: get_object 0@ position_3D_coord_with_offset 0.0 -0.6 -1.8 store_to 18@ 19@ 20@ 
Actor.PutAt($PLAYER_ACTOR, 18@, 19@, 20@)
0812: set_actor $PLAYER_ACTOR perform_animation "JUMP_GLIDE" file "PED" 4.0 loop 0 lockX 0 lockY 0 lockF 0 timelimit -1 //versionB 
0470: get_actor $PLAYER_ACTOR current_weapon_to 24@ 
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0 
32@ = 0 // L = INT 

:LADDER_712
wait 0 
if 
  32@ > 2500 // L > INT 
jf @LADDER_712 
0400: get_object 0@ position_3D_coord_with_offset 0.05 0.5 1.9 store_to 21@ 22@ 23@ 
Actor.PutAt($PLAYER_ACTOR, 21@, 22@, 23@)
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24@ 
Player.CanMove($PLAYER_CHAR) = True
Camera.Restore
jump @LADDER_1153 

:LADDER_802
if 
   Object.Model(0@) == #DYN_LADDER_2
jf @LADDER_1153 
Player.CanMove($PLAYER_CHAR) = False
04C4: get_actor $PLAYER_ACTOR position_3D_coord_with_offset 0.6 -4.0 0.0 store_to 8@ 9@ 10@ 
04C4: get_actor $PLAYER_ACTOR position_3D_coord_with_offset 0.6 -5.5 5.0 store_to 11@ 12@ 13@ 
068E: get_camera_target_point_3D_coord_to 14@ 15@ 16@ 
17@ = 4.04 // L = FLOAT 
0063: 16@ -= 10@ // L -= L (float) 
0073: 16@ /= 17@ // L /= L (float) 
0097: make 16@ absolute_float // local 
005B: 10@ += 16@ // L += L (float) 
Camera.OnPed($PLAYER_ACTOR, 15, 2)
0936: set_camera_position_3D_coord_to 8@ 9@ 10@ transverse_to 11@ 12@ 13@ timelimit 4000 drop_mode 1 
0400: get_object 0@ position_3D_coord_with_offset 0.0 -0.6 -1.8 store_to 18@ 19@ 20@ 
Actor.PutAt($PLAYER_ACTOR, 18@, 19@, 20@)
0812: set_actor $PLAYER_ACTOR perform_animation "JUMP_LAND" file "PED" 4.0 loop 0 lockX 0 lockY 0 lockF 0 timelimit -1 //versionB 
0470: get_actor $PLAYER_ACTOR current_weapon_to 24@ 
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 0 
32@ = 0 // L = INT 

:LADDER_1070
wait 0 
if 
  32@ > 3800 // L > INT 
jf @LADDER_1070 
0400: get_object 0@ position_3D_coord_with_offset 0.05 1.0 2.8 store_to 21@ 22@ 23@ 
Actor.PutAt($PLAYER_ACTOR, 21@, 22@, 23@)
01B9: set_actor $PLAYER_ACTOR armed_weapon_to 24@ 
Player.CanMove($PLAYER_CHAR) = True
Camera.Restore

:LADDER_1153
end_thread 
